#ifndef SHADERMANAGER_H
#define SHADERMANAGER_H

#include <Windows.h>
#include <xnamath.h>
#include <process.h>

#include <d3d9.h>
#include <d3dx9.h>

class Mesh;
class Material;

class ShaderManager
{
public:
	ShaderManager();
	~ShaderManager();
	ShaderManager(ShaderManager& _ref);

	static void Initialize();

	static void RenderColorIndexed(Mesh &mesh, Material& material);
	static void RenderDiffuseIndexed(Mesh &mesh, Material& material);

	static void RenderColorOrtho(Mesh& mesh, Material& material);

	static void Shutdown();

	static XMMATRIX GetOrtho();

	static void SetMVP(XMMATRIX& _mvp);
	static void SetOrtho(XMMATRIX& _ortho);
	static void SetMaterialDiffuse(Material& material);

private:

	static void LoadShaders();
	static void LoadHandles();

	//Handles
	static D3DXHANDLE hMVP;
	static D3DXHANDLE hOrtho;
	static D3DXHANDLE hColor;
	static D3DXHANDLE hDiffuse;
	static D3DXHANDLE hNormal;
	static D3DXHANDLE hSpecular;

	static XMMATRIX ortho;

	//Mesh Effects
	static ID3DXEffect* basicEffect;
	static ID3DXEffect* unlitColor;
	static ID3DXEffect* unlitColorOrtho;

	//Post Process Effects
};

#endif